package com.mc.string;

import java.util.Scanner;

public class EightSplit {
    public static void main(String[] args){
        
    	Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String str1 = sc.nextLine();
            String str2 = sc.nextLine();
            split(str1);
            split(str2);
        }
        
    }
    public static void split(String str){
        
        while(str.length()>=8){
            String temp =str.substring(0,8);
       		str = str.substring(8); 
            System.out.println(temp);
            if(str.length()==0)
            	return;
        }
  		System.out.print(str);
        for(int i=0;i<8-str.length();i++)
            System.out.print(0);
        System.out.println();
    }
}
